{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "a8b892c8",
   "metadata": {},
   "source": [
    "Printed and electronic copies of *Modeling and Simulation in Python* are available from [No Starch Press](https://nostarch.com/modeling-and-simulation-python) and [Bookshop.org](https://bookshop.org/p/books/modeling-and-simulation-in-python-allen-b-downey/17836697?ean=9781718502161) and [Amazon](https://amzn.to/3y9UxNb)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "infrared-shower",
   "metadata": {},
   "source": [
    "# Nondimensionalization"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "documentary-steal",
   "metadata": {
    "tags": []
   },
   "source": [
    "*Modeling and Simulation in Python*\n",
    "\n",
    "Copyright 2021 Allen Downey\n",
    "\n",
    "License: [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "earned-kidney",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "# download modsim.py if necessary\n",
    "\n",
    "from os.path import basename, exists\n",
    "\n",
    "def download(url):\n",
    "    filename = basename(url)\n",
    "    if not exists(filename):\n",
    "        from urllib.request import urlretrieve\n",
    "        local, _ = urlretrieve(url, filename)\n",
    "        print('Downloaded ' + local)\n",
    "    \n",
    "download('https://raw.githubusercontent.com/AllenDowney/' +\n",
    "         'ModSimPy/master/modsim.py')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "forty-hammer",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "# import functions from modsim\n",
    "\n",
    "from modsim import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "middle-surge",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "download('https://github.com/AllenDowney/ModSimPy/raw/master/' +\n",
    "         'chap11.py')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "hybrid-making",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "download('https://github.com/AllenDowney/ModSimPy/raw/master/' +\n",
    "         'chap12.py')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "inclusive-characteristic",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "download('https://github.com/AllenDowney/ModSimPy/raw/master/' +\n",
    "         'chap13.py')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "grave-occasions",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "# import code from previous notebooks\n",
    "\n",
    "from chap11 import make_system\n",
    "from chap11 import update_func\n",
    "from chap11 import run_simulation\n",
    "from chap11 import plot_results\n",
    "\n",
    "from chap12 import calc_total_infected\n",
    "\n",
    "from chap13 import sweep_beta\n",
    "from chap13 import sweep_parameters"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "brief-trademark",
   "metadata": {},
   "source": [
    "In the previous chapter we swept the parameters of the Kermack-McKendrick (KM) model: the contact rate, `beta`, and the recovery rate, `gamma`.\n",
    "For each pair of parameters, we ran a simulation and computed the total fraction of the population infected.\n",
    "\n",
    "In this chapter we'll investigate the relationship between the parameters and this metric, using both simulation and analysis."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "weekly-award",
   "metadata": {},
   "source": [
    "The figures in the previous chapter suggest that there is a relationship between the parameters of the KM model, `beta` and `gamma`, and the fraction of the population that is infected. Let's think what that relationship might be.\n",
    "\n",
    "-   When `beta` exceeds `gamma`, there are more contacts\n",
    "    than recoveries during each day. The difference between `beta` and `gamma` might be called the *excess contact rate*, in units of contacts per day.\n",
    "\n",
    "-   As an alternative, we might consider the ratio `beta/gamma`, which\n",
    "    is the number of contacts per recovery. Because the numerator and\n",
    "    denominator are in the same units, this ratio is *dimensionless*, which means it has no units.\n",
    "\n",
    "Describing physical systems using dimensionless parameters is often a\n",
    "useful move in the modeling and simulation game. In fact, it is so useful that it has a name: *nondimensionalization* (see\n",
    "<http://modsimpy.com/nondim>).\n",
    "So that's what we'll try first."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "legendary-terrorism",
   "metadata": {},
   "source": [
    "## Exploring the Results\n",
    "\n",
    "In the previous chapter, we wrote a function, `sweep_parameters`,\n",
    "that takes an array of values for `beta` and an array of values for `gamma`.\n",
    "It runs a simulation for each pair of parameters and returns a `SweepFrame` with the results.\n",
    "\n",
    "I'll run it again with the following arrays of parameters."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "genetic-morris",
   "metadata": {},
   "outputs": [],
   "source": [
    "beta_array = [0.1, 0.2, 0.3, 0.4, 0.5, \n",
    "              0.6, 0.7, 0.8, 0.9, 1.0 , 1.1]\n",
    "gamma_array = [0.2, 0.4, 0.6, 0.8]\n",
    "frame = sweep_parameters(beta_array, gamma_array)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "hearing-cycle",
   "metadata": {},
   "source": [
    "Here's what the first few rows look like:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "appointed-terrorist",
   "metadata": {},
   "outputs": [],
   "source": [
    "frame.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "catholic-alfred",
   "metadata": {},
   "source": [
    "The `SweepFrame` has one row for each value of `beta` and one column for each value of `gamma`. \n",
    "We can print the values in the `SweepFrame` like this:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "collected-waterproof",
   "metadata": {},
   "outputs": [],
   "source": [
    "for gamma in frame.columns:\n",
    "    column = frame[gamma]\n",
    "    for beta in column.index:\n",
    "        metric = column[beta]\n",
    "        print(beta, gamma, metric)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "unexpected-surgeon",
   "metadata": {},
   "source": [
    "This is the first example we've seen with one `for` loop inside another:\n",
    "\n",
    "-   Each time the outer loop runs, it selects a value of `gamma` from\n",
    "    the columns of the `SweepFrame` and extracts the corresponding\n",
    "    column.\n",
    "\n",
    "-   Each time the inner loop runs, it selects a value of `beta` from the index of the column and selects the corresponding element, which is the fraction of the population that got infected.\n",
    "\n",
    "Since there are 11 rows and 4 columns, the total number of lines in the output is 44.\n",
    "\n",
    "The following function uses the same loops to enumerate the elements of the `SweepFrame`, but instead of printing a line for each element, it plots a point."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "polar-flash",
   "metadata": {},
   "outputs": [],
   "source": [
    "from matplotlib.pyplot import plot\n",
    "\n",
    "def plot_sweep_frame(frame):\n",
    "    for gamma in frame.columns:\n",
    "        column = frame[gamma]\n",
    "        for beta in column.index:\n",
    "            metric = column[beta]\n",
    "            plot(beta/gamma, metric, '.', color='C1')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "shared-boxing",
   "metadata": {},
   "source": [
    "For each element of the `SweepFrame` it plots a point with the ratio `beta/gamma` as the $x$ coordinate and `metric` -- which is the fraction of the population that's infected -- as the $y$ coordinate.\n",
    "\n",
    "Here's what it looks like:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "incorporate-launch",
   "metadata": {},
   "outputs": [],
   "source": [
    "plot_sweep_frame(frame)\n",
    "\n",
    "decorate(xlabel='Contact number (beta/gamma)',\n",
    "         ylabel='Fraction infected')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "tropical-colony",
   "metadata": {},
   "source": [
    "The results fall on a single curve, at least approximately. That means that we can predict the fraction of the population that will be infected based on a single parameter, the ratio `beta/gamma`. We don't need to know the values of `beta` and `gamma` separately."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "lightweight-surfing",
   "metadata": {},
   "source": [
    "## Contact Number\n",
    "\n",
    "From Chapter 11, recall that the number of new infections in a\n",
    "given day is $\\beta s i N$, and the number of recoveries is\n",
    "$\\gamma i N$. If we divide these quantities, the result is\n",
    "$\\beta s / \\gamma$, which is the number of new infections per recovery\n",
    "(as a fraction of the population).\n",
    "\n",
    "When a new disease is introduced to a susceptible population, $s$ is\n",
    "approximately 1, so the number of people infected by each sick person is $\\beta / \\gamma$. This ratio is called the *contact number* or *basic reproduction number* (see <http://modsimpy.com/contact>). By convention it is usually denoted $R_0$, but in the context of an SIR model, that notation is confusing, so we'll use $c$ instead."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "banner-egyptian",
   "metadata": {},
   "source": [
    "The results in the previous section suggest that there is a relationship between $c$ and the total number of infections. We can derive this relationship by analyzing the differential equations from\n",
    "Chapter 11:\n",
    "\n",
    "$$\\begin{aligned}\n",
    "\\frac{ds}{dt} &= -\\beta s i \\\\\n",
    "\\frac{di}{dt} &= \\beta s i - \\gamma i\\\\\n",
    "\\frac{dr}{dt} &= \\gamma i\\end{aligned}$$ \n",
    "\n",
    "In the same way we divided the\n",
    "contact rate by the infection rate to get the dimensionless quantity\n",
    "$c$, now we'll divide $di/dt$ by $ds/dt$ to get a ratio of rates:\n",
    "\n",
    "$$\\frac{di}{ds} = \\frac{\\beta s i - \\gamma i}{-\\beta s i}$$ \n",
    "\n",
    "Which we can simplify as\n",
    "\n",
    "$$\\frac{di}{ds} = -1 + \\frac{\\gamma}{\\beta s}$$ \n",
    "\n",
    "Replacing $\\beta/\\gamma$ with $c$, we can write\n",
    "\n",
    "$$\\frac{di}{ds} = -1 + \\frac{1}{c s}$$ "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "noticed-mouse",
   "metadata": {},
   "source": [
    "Dividing one differential equation by another is not an obvious move, but in this case it is useful because it gives us a relationship between $i$, $s$, and $c$ that does not depend on time. From that relationship, we can derive an equation that relates $c$ to the final value of $s$. In theory, this equation makes it possible to infer $c$ by observing the course of an epidemic."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "accessible-bernard",
   "metadata": {},
   "source": [
    "Here's how the derivation goes. We multiply both sides of the previous\n",
    "equation by $ds$: \n",
    "\n",
    "$$di = \\left( -1 + \\frac{1}{cs} \\right) ds$$ \n",
    "\n",
    "And then integrate both sides: \n",
    "\n",
    "$$i = -s + \\frac{1}{c} \\log s + q$$ \n",
    "\n",
    "where $q$ is a constant of integration. Rearranging terms yields:\n",
    "\n",
    "$$q = i + s - \\frac{1}{c} \\log s$$ \n",
    "\n",
    "Now let's see if we can figure out what $q$ is. At the beginning of an epidemic, if the fraction infected is small and nearly everyone is susceptible, we can use the approximations $i(0) = 0$ and $s(0) = 1$ to compute $q$:\n",
    "\n",
    "$$q = 0 + 1 + \\frac{1}{c} \\log 1$$ \n",
    "\n",
    "Since $\\log 1 = 0$, we get $q = 1$."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "instrumental-placement",
   "metadata": {},
   "source": [
    "Now, at the end of the epidemic, let's assume that $i(\\infty) = 0$, and $s(\\infty)$ is an unknown quantity, $s_{\\infty}$. Now we have:\n",
    "\n",
    "$$q = 1 = 0 + s_{\\infty}- \\frac{1}{c} \\log s_{\\infty}$$ \n",
    "\n",
    "Solving for $c$, we get \n",
    "\n",
    "$$c = \\frac{\\log s_{\\infty}}{s_{\\infty}- 1}$$ \n",
    "\n",
    "By relating $c$ and $s_{\\infty}$, this equation makes it possible to estimate $c$ based on data, and possibly predict the behavior of future epidemics."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "under-dating",
   "metadata": {},
   "source": [
    "## Analysis and Simulation\n",
    "\n",
    "Let's compare this analytic result to the results from simulation. I'll create an array of values for $s_{\\infty}$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "architectural-growth",
   "metadata": {},
   "outputs": [],
   "source": [
    "s_inf_array = linspace(0.003, 0.99, 50)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "oriented-turtle",
   "metadata": {},
   "source": [
    "And compute the corresponding values of $c$:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "narrative-embassy",
   "metadata": {},
   "outputs": [],
   "source": [
    "from numpy import log\n",
    "\n",
    "c_array = log(s_inf_array) / (s_inf_array - 1)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "assisted-public",
   "metadata": {},
   "source": [
    "To get the total infected, we compute the difference between $s(0)$ and\n",
    "$s(\\infty)$, then store the results in a `Series`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "canadian-assumption",
   "metadata": {},
   "outputs": [],
   "source": [
    "frac_infected = 1 - s_inf_array"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "published-generation",
   "metadata": {},
   "source": [
    "The ModSim library provides a function called `make_series` we can use to put `c_array` and `frac_infected` in a Pandas `Series`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "antique-watch",
   "metadata": {},
   "outputs": [],
   "source": [
    "frac_infected_series = make_series(c_array, frac_infected)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "conscious-bathroom",
   "metadata": {},
   "source": [
    "Now we can plot the results:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "fallen-router",
   "metadata": {},
   "outputs": [],
   "source": [
    "plot_sweep_frame(frame)\n",
    "frac_infected_series.plot(label='analysis')\n",
    "\n",
    "decorate(xlabel='Contact number (c)',\n",
    "         ylabel='Fraction infected')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "billion-worthy",
   "metadata": {},
   "source": [
    "When the contact number exceeds 1, analysis and simulation agree. When\n",
    "the contact number is less than 1, they do not: analysis indicates there should be no infections; in the simulations there are a small number of infections.\n",
    "\n",
    "The reason for the discrepancy is that the simulation divides time into a discrete series of days, whereas the analysis treats time as a\n",
    "continuous quantity.\n",
    "When the contact number is large, these two models agree; when it is small, they diverge."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "alternate-surprise",
   "metadata": {},
   "source": [
    "## Estimating Contact Number\n",
    "\n",
    "The previous figure shows that if we know the contact number, we can estimate the fraction of the population that will be infected with just a few arithmetic operations.\n",
    "We don't have to run a simulation.\n",
    "\n",
    "We can also read the figure the other way; if we know what fraction of the population was affected by a past outbreak, we can estimate the contact number.\n",
    "Then, if we know one of the parameters, like `gamma`, we can use the contact number to estimate the other parameter, like `beta`.\n",
    "\n",
    "At least in theory, we can.\n",
    "In practice, it might not work very well, because of the shape of the curve. \n",
    "\n",
    "* When the contact number is low, the curve is quite steep, which means that small changes in $c$ yield big changes in the number of infections. If we observe that the total fraction infected is anywhere from 20% to 80%, we would conclude that $c$ is near 2.\n",
    "\n",
    "* And when the contact number is high, the curve is nearly flat, which means that it's hard to see the difference between values of $c$ between 3 and 6.\n",
    "\n",
    "With the uncertainty of real data, we might not be able to estimate $c$ with much precision.\n",
    "But as one of the exercises below, you'll have a chance to try."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "related-council",
   "metadata": {},
   "source": [
    "## Summary\n",
    "\n",
    "In this chapter we used simulations to explore the relationship between `beta`, `gamma`, and the fraction infected.\n",
    "Then we used analysis to explain that relationship.\n",
    "\n",
    "With that, we are done with the Kermack-McKendrick model.\n",
    "In the next chapter we'll move on to thermal systems and the notorious coffee cooling problem."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "removed-conviction",
   "metadata": {},
   "source": [
    "## Exercises\n",
    "\n",
    "This chapter is available as a Jupyter notebook where you can read the text, run the code, and work on the exercises. \n",
    "You can access the notebooks at <https://allendowney.github.io/ModSimPy/>."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "textile-program",
   "metadata": {},
   "source": [
    "### Exercise 1\n",
    "\n",
    " At the beginning of this chapter, I suggested two ways to relate `beta` and `gamma`: we could compute their difference or their ratio.\n",
    "\n",
    "Because the ratio is dimensionless, I suggested we explore it first, and that led us to discover the contact number, which is `beta/gamma`.\n",
    "When we plotted the fraction infected as a function of the contact number, we found that this metric falls on a single curve, at least approximately.\n",
    "That indicates that the ratio is enough to predict the results; we don't have to know `beta` and `gamma` individually. \n",
    "\n",
    "But that leaves a question open: what happens if we do the same thing using the difference instead of the ratio?\n",
    "\n",
    "Write a version of `plot_sweep_frame`, called `plot_sweep_frame_difference`, that plots the fraction infected versus the difference `beta-gamma`.\n",
    "\n",
    "What do the results look like, and what does that imply? "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "current-tiger",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "specialized-regression",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "canadian-authentication",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "angry-perfume",
   "metadata": {},
   "source": [
    "### Exercise 2\n",
    "\n",
    " Suppose you run a survey at the end of the semester and find that 26% of students had the Freshman Plague at some point.\n",
    "What is your best estimate of `c`?\n",
    "\n",
    "Hint: if you display `frac_infected_series`, you can read off the answer. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "surgical-mouth",
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "focused-magnet",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "charged-sample",
   "metadata": {},
   "source": [
    "### Exercise 3\n",
    "\n",
    "So far the only metric we have considered is the total fraction of the population that gets infected over the course of an epidemic.  That is an important metric, but it is not the only one we care about.\n",
    "\n",
    "For example, if we have limited resources to deal with infected people, we might also be concerned about the number of people who are sick at the peak of the epidemic, which is the maximum of `I`.\n",
    "\n",
    "Write a version of `sweep_beta` that computes this metric, and use it to compute a `SweepFrame` for a range of values of `beta` and `gamma`.\n",
    "Make a contour plot that shows the value of this metric as a function of `beta` and `gamma`.\n",
    "\n",
    "Then use `plot_sweep_frame` to plot the maximum of `I` as a function of the contact number, `beta/gamma`.\n",
    "Do the results fall on a single curve?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "greatest-palestine",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "average-practitioner",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "elegant-gamma",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "plain-dayton",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "sexual-services",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "central-fever",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "tropical-advancement",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Solution goes here"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "editorial-coating",
   "metadata": {},
   "source": [
    "## Under the Hood\n",
    "\n",
    "ModSim provides `make_series` to make it easier to create a Pandas Series.  In this chapter, we used it like this: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "corresponding-india",
   "metadata": {},
   "outputs": [],
   "source": [
    "frac_infected_series = make_series(c_array, frac_infected)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "comparable-strap",
   "metadata": {},
   "source": [
    "If you import `Series` from Pandas, you can make a `Series` yourself, like this:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "constant-christianity",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pandas import Series\n",
    "\n",
    "frac_infected_series = Series(frac_infected, c_array)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "wireless-president",
   "metadata": {},
   "source": [
    "The difference is that the arguments are in reverse order: the first argument is stored as the values in the `Series`; the second argument is stored as the index.\n",
    "\n",
    "I find that order counterintuitive, which is why I use `make_series`.\n",
    "`make_series` takes the same optional keyword arguments as `Series`, which you can read about at <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.html>."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "hidden-recipient",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "celltoolbar": "Tags",
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
